







[This topic is pre-release documentation and is subject to change in future releases. Blank topics are included as placeholders.]
Returns the last item in the bag: the item
that would appear last if the bag was enumerated. This is also the largest
item in the bag.
Namespace: Wintellect.PowerCollections
Assembly:
PowerCollections (in PowerCollections.dll)
Syntax
C# |
---|
public T GetLast() |
Visual Basic (Declaration) |
---|
Public Function GetLast As T |
Visual C++ |
---|
public: T GetLast () |
Return Value
The last item in the bag. If more than one item is largest, the last one added is returned.
Remarks
GetLast() takes time O(log N), where N is the number of items in the bag.
Exceptions
Exception | Condition |
---|---|
System..::InvalidOperationException | The bag is empty. |
See Also
OrderedBag<(Of <T>)> Class
Wintellect.PowerCollections Namespace